import request from '@/utils/request'
import requests from '@/utils/oaRequest'
export function login(data) {
  return requests({
    url: '/sys/login',
    method: 'post',
    data
  })
}
export const getCodeImage=(data)=>requests({
  url:`/sys/randomImage/${data}`,method:"get"
})

export function getInfo(token) {
  return request({
    url: '/vue-admin-template/user/info',
    method: 'get',
    params: { token }
  })
}
export const getUserList=()=>requests({
  url:`/sys/sysDepartRole/list`,
  method:"get"
})
export const getWork=()=>requests({
  url:'/sys/position/list',
  method:"get"
})

export function logout() {
  return requests({
    url: '/logout',
    method: 'post'
  })
}
/**
 * 获取验证图片 以及token
 *
 * @author Jax
 * @date 2021/1/22 00:00
 */
 export function reqGet(data) {
  return requests({
    url: '/captcha/get',
    method: 'post',
    data
  })
}

/**
 * 滑动或者点选验证
 *
 * @author Jax
 * @date 2021/1/22 00:00
 */
export function reqCheck(data) {
  return requests({
    url: '/captcha/check',
    method: 'post',
    data
  })
}

export function getCaptchaOpen (parameter) {
  return requests({
    url: '/getCaptchaOpen',
    method: 'get',
    params: parameter
  })
}
// 获取数据字典表单数据
// export function result ()

